package day52.basic.controller;


import day52.basic.domain.dto.SmsRegisteDto;
import day52.basic.service.IRegisterService;
import day52.basic.util.AjaxResult;
import day52.user.service.ILogininfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/registe")
public class RegisterController {

    @Autowired
    private IRegisterService registerService;

    @PostMapping("/sms")
    public AjaxResult registe(@RequestBody @Valid SmsRegisteDto dto){
        registerService.registe(dto);
        return AjaxResult.me();
    }
}
